package com.example.anpapi.entity.po.usermodel.Author;

import com.baomidou.mybatisplus.annotation.*;
import com.example.anpapi.entity.po.usermodel.Author.AuthorLevel;
import com.example.anpapi.entity.po.usermodel.UserStatistics.CertificationStatus;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@TableName("authors")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Author implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 作者ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 笔名
     */
    @TableField("pen_name")
    private String penName;

    /**
     * 真实姓名
     */
    @TableField("real_name")
    private String realName;

    /**
     * 身份证号
     */
    @TableField("id_card_number")
    private String idCardNumber;

    /**
     * 联系电话
     */
    @TableField("contact_phone")
    private String contactPhone;

    /**
     * 银行账户
     */
    @TableField("bank_account")
    private String bankAccount;

    /**
     * 作者等级
     */
    @TableField("author_level")
    private AuthorLevel authorLevel;

    /**
     * 累计字数
     */
    @TableField("total_words")
    private Long totalWords;

    /**
     * 粉丝数
     */
    @TableField("total_followers")
    private Integer totalFollowers;

    /**
     * 月收入
     */
    @TableField("monthly_income")
    private BigDecimal monthlyIncome;

    /**
     * 认证状态
     */
    @TableField("certification_status")
    private CertificationStatus certificationStatus;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;

}

